"""
【练习】非固定数值计算
输入任意数字求和，求平均值，求最大值，求最小值,直到输入bye结束，计算数字不考虑浮点数
"""

def not_regular_num(data):
    max_num = data[0]
    min_num = data[0]
    sum_num = 0
    length_data = len(data)
    if data == 'bye':
        print('bye')
    elif data != 'bye':
        for i in data:
            sum_num += i
            if i > max_num:
                max_num = i
            elif i < min_num:
                min_num = i
        avg_num = sum_num // length_data
        return f'平均值为{avg_num},最大值为{max_num},最小值为{min_num},和为{sum_num}'




